package cn.iocoder.yudao.module.dbit.dal.mysql.schmaj;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dbit.dal.dataobject.schmaj.SchMajDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dbit.controller.admin.schmaj.vo.*;

/**
 * 共建院校对应专业 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface SchMajMapper extends BaseMapperX<SchMajDO> {

    default PageResult<SchMajDO> selectPage(SchMajPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SchMajDO>()
                .eqIfPresent(SchMajDO::getSchId, reqVO.getSchId())
                .eqIfPresent(SchMajDO::getMajId, reqVO.getMajId())
                .betweenIfPresent(SchMajDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SchMajDO::getId));
    }

}